import type { VxeTableGridOptions } from '#/adapter/vxe-table';

import { $t } from '#/locales';

/** 详情列表的字段 */
export function useDetailListColumns(): VxeTableGridOptions['columns'] {
  return [
    {
      title: $t('views.crm.common.customer'),
      field: 'customerName',
      minWidth: 150,
    },
    {
      title: $t('views.crm.contract.contractNo'),
      field: 'contractNo',
      minWidth: 150,
    },
    {
      title: $t('views.crm.receivablePlan.period'),
      field: 'period',
      minWidth: 150,
    },
    {
      title: $t('views.crm.receivablePlan.price'),
      field: 'price',
      minWidth: 150,
      formatter: 'formatAmount2',
    },
    {
      title: $t('views.crm.receivablePlan.returnTime'),
      field: 'returnTime',
      minWidth: 150,
      formatter: 'formatDateTime',
    },
    {
      title: $t('views.crm.receivablePlan.remindDays'),
      field: 'remindDays',
      minWidth: 150,
    },
    {
      title: $t('views.crm.receivablePlan.remindTime'),
      field: 'remindTime',
      minWidth: 150,
      formatter: 'formatDateTime',
    },
    {
      title: $t('views.crm.common.ownerUserId'),
      field: 'ownerUserName',
      minWidth: 150,
    },
    {
      title: $t('common.remark'),
      field: 'remark',
      minWidth: 150,
    },
    {
      title: $t('common.action'),
      field: 'actions',
      width: 240,
      fixed: 'right',
      slots: { default: 'actions' },
    },
  ];
}
